package com.demo.apparel.mapper.uniapp;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.demo.apparel.entity.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface WxCategoryMapper extends BaseMapper<Category> {
    @Select("SELECT id, category, category_name AS categoryName FROM categories ORDER BY category ASC")
    List<Category> selectAllCategories();
    /**
     *
     */
//    @Select("SELECT id, category, category_name AS categoryName FROM categories ORDER BY category ASC")
//    List<Category> selectAllCategories();

    @Select("SELECT category, category_name FROM categories")
    List<Category> getCategoryMap();

    @Select("SELECT id, category, category_name, created_time, updated_time FROM categories")
    List<Category> selectList();
}
